#include <iostream>
using namespace std;

#define max(a,b) (a>b?a:b)

int MAP[20][20];
int DP[20][20];
int N, M;


void put_horse(int x, int y) {
	MAP[x][y]=1;
	if (x-2 >= 0) {
		if (y-1 >= 0) MAP[x-2][y-1]=1;
		MAP[x-2][y+1]=1;
	}
	if (x-1 >= 0) {
		if (y-2 >= 0) MAP[x-1][y-2]=1;
		MAP[x-1][y+2]=1;
	}
	if (y-2 >= 0) MAP[x+1][y-2]=1;
	MAP[x+1][y+2]=1;
	if (y-1 >= 0) MAP[x+2][y-1]=1;
	MAP[x+2][y+1]=1;
}


int main() {
	cin >> N >> M;
	int mx, my;
	cin >> mx >> my;
	put_horse(mx, my);
	for (int i=0; i<=N; i++) {
		for (int j=0; j<=M; j++) {
			if (i==0 && j==0) {
				DP[i][j]=1;
				continue;
			}
			if (MAP[i][j]) continue;
			if (i>0 && j>0 && MAP[i-1][j] && MAP[i][j-1]) {
				DP[i][j] = 0;
			}
			else if (i==0 || MAP[i-1][j]) {
				DP[i][j]=DP[i][j-1];
			}
			else if (j==0 || MAP[i][j-1]) {
				DP[i][j]=DP[i-1][j];
			}
			else {
				DP[i][j] = DP[i-1][j]+DP[i][j-1];
			}
		}
	}
	cout << DP[N][M] << endl;
	return 0;
}
